import { createApp,createSSRApp  } from 'vue'
import App from './App.vue'
import router, { setupRouter } from '/@ts/router'
import {setupStore, store} from '/@ts/store/index';
import ElementPlus from 'element-plus'
import 'element-plus/theme-chalk/display.css';//1.1.0-beta.10 版本
import 'element-plus/dist/index.css'//1.1.0-beta.10 版本
import 'animate.css/animate.min.css';
import * as ElIcon from '@element-plus/icons-vue'
import 'element-plus/theme-chalk/dark/css-vars.css'// 由于当前界面的UI是自定义的所以无效
import './init.scss';
// 国际化
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
import "dayjs/locale/zh-cn";
import { setupDirectivePage } from "/@ts/directive/page";
import TableV2 from "/@/components/table/tableV2.vue";
import filterBox from "/@/components/Filter/filterBox.vue";
import TableColumn from "/@/components/table/component/tableColumn.vue";
import comIcon from "/@/components/icon/index";
import ComDetail from '/@/components/detail/detail.vue'
import ComDialog from '/@/components/Dialog/index.vue'
import elementEasyForm from 'element-easy-form'
import 'element-easy-form/dist/style.css'


import selectDict from "/@/components/selectDict/index.vue";
const app = createApp(App);
app.use(comIcon);
app.component("selectDict", selectDict);
app.component("ComDetail", ComDetail);
app.component("ComDialog", ComDialog);
app.component("TableColumn", TableColumn);
app.component("filterBox", filterBox);
console.log('ElementPlus :>> ', ElementPlus);
app.use(ElementPlus, { locale: zhCn }); //element-plus挂载
for (const key in ElIcon) {
    app.component(key,ElIcon[key])
}
app.component('TableV2',TableV2)
app.use(elementEasyForm)//element-plus挂载
setupRouter(app)
setupStore(app)
setupDirectivePage(app)
app.mount('#app')
